<?php
/**
 * The main template of the theme.
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * E.g., it puts together the home page when no home.php file exists.
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package Behold
 * @since Behold 1.0.0
 */
?>


<?php 
	get_header();	
	
	if ( have_posts() ) :
		behold_post_navigation( "nav-above" );
	endif;
?>
<div id="main" class="group">
	<div id="posts-container">			
		<?php
		if (have_posts()) :
			while (have_posts()) :
				the_post();			
				if ( get_post_format() == "gallery" ):
					get_template_part( 'content', 'gallery' );
				elseif ( get_post_format() == "audio" ):
					get_template_part( 'content', 'audio' );
				else :
					get_template_part( 'content' );
				endif;
			endwhile;
		endif;
		?>
	</div>	<!-- closing of posts-container> -->
	<?php if ( have_posts() ) :
		behold_post_navigation( "nav-below" );
		endif;
	?>
		
</div><!-- closing of id="main" -->
<?php
		get_sidebar('right');
		get_footer(); 
?>
